<include file="Public:header" />
<div class="ibox-content">
<form class="form-horizontal" id="f_add" method="post" >
  <input type="hidden" name="id" value="{$vo.id}" />
   <div class="form-group" >
		<label class="col-sm-3 control-label" for="name"></label>
		<div class="col-sm-6"> 
        <h4> 转寄邮箱设置</h4> 
		</div>
	</div>
	
	 <div class="form-group" >
		<label class="col-sm-3 control-label" for="name">邮箱地址：</label>
		<div class="col-sm-6"> 
          <span class="require">*</span><input  type="text" name="title" id="title" value="{$vo.title}" />
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-3 control-label" for="name"></label>
		<div class="col-sm-8">
			
			<input class="btn btn-primary" id="btn_save" type="submit" name="submit" value="设置"/> 
		</div>
	</div>
</form>
</div>

 <script>


function showResponse(responseText,statusText) {
  if(statusText=='success'){
	  console.log(responseText);
	if (responseText.status == 1) {
		parent.layer.msg(responseText.info, {icon: 1}); //正确的图标提示
		$(".form-control").val("");
		$("#refresh_data_table").trigger("click");
		//parent.layer.closeAll();
	} else {
		parent.layer.msg(responseText.info, {icon: 2}); //错误的图标提示
	}
	
  }
}


$(function(){
	
	$.validator.setDefaults({
		highlight: function (element) {
			$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
		},
		success: function (element) {
			element.closest('.form-group').removeClass('has-error').addClass('has-success');
		},
		errorElement: "span",
		errorPlacement: function (error, element) {
			if (element.is(":radio") || element.is(":checkbox")) {
				error.appendTo(element.parent().parent().parent());
			} else {
				error.appendTo(element.parent());
			}
		},
		errorClass: "help-block m-b-none",
		validClass: "help-block m-b-none"


	});
	
	

   $("#f_add").validate({
        submitHandler:function(form){
			//var param = $("#f_add").serialize();  
			//var url = '__APP__/index.php/Admin/email/';
			//console.log(url);
			//console.log(param);
	  		//ajax_do(url,param);	
	  		$("#f_add").submit();
			
        }    
    });



	$("#menu_system").trigger("click").addClass("active");
	$("#menu_system").parent().find("li").eq(0).addClass("active");
//$(".fa-fw:first").parent().parent();


});


</script>

<include file="Public:footer" />